<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>My Project: stdalloc Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classstdalloc-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">stdalloc Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for stdalloc:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classstdalloc.png" usemap="#stdalloc_map" alt=""/>
  <map id="stdalloc_map" name="stdalloc_map">
<area href="class_allocate.html" alt="Allocate" shape="rect" coords="0,0,58,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5dcbbfb5f2d7b04138c5f74e6c561ffa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstdalloc.html#a5dcbbfb5f2d7b04138c5f74e6c561ffa">stdalloc</a> (<a class="el" href="class_map.html">Map</a> &amp;map, volatile bool &amp;<a class="el" href="class_allocate.html#a4d10076b88ab1297c89b8a05e117b510">exit_alloc</a>)</td></tr>
<tr class="separator:a5dcbbfb5f2d7b04138c5f74e6c561ffa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46d60193ee113f34caf4ddf4385c9f0d"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstdalloc.html#a46d60193ee113f34caf4ddf4385c9f0d">~stdalloc</a> ()</td></tr>
<tr class="separator:a46d60193ee113f34caf4ddf4385c9f0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60438b15948ce354b52b03ba6d975de0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstdalloc.html#a60438b15948ce354b52b03ba6d975de0">run</a> ()</td></tr>
<tr class="separator:a60438b15948ce354b52b03ba6d975de0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_allocate"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_allocate')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_allocate.html">Allocate</a></td></tr>
<tr class="memitem:a61d8b01e404c23ead20068035e3ba540 inherit pub_methods_class_allocate"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a61d8b01e404c23ead20068035e3ba540">Allocate</a> (<a class="el" href="class_map.html">Map</a> &amp;map, volatile bool &amp;<a class="el" href="class_allocate.html#a4d10076b88ab1297c89b8a05e117b510">exit_alloc</a>)</td></tr>
<tr class="separator:a61d8b01e404c23ead20068035e3ba540 inherit pub_methods_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68cd61da26f3b82da094b6d3e5d556f5 inherit pub_methods_class_allocate"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a68cd61da26f3b82da094b6d3e5d556f5">~Allocate</a> ()</td></tr>
<tr class="separator:a68cd61da26f3b82da094b6d3e5d556f5 inherit pub_methods_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3123c2c1d9584974ce19b47fe6ceea17 inherit pub_methods_class_allocate"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a3123c2c1d9584974ce19b47fe6ceea17">waitTillReady</a> ()</td></tr>
<tr class="separator:a3123c2c1d9584974ce19b47fe6ceea17 inherit pub_methods_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_class_allocate"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_allocate')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_allocate.html">Allocate</a></td></tr>
<tr class="memitem:a1d5c71b5cd6fc9671ed82d9c1d04965c inherit pro_methods_class_allocate"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a1d5c71b5cd6fc9671ed82d9c1d04965c">initialize</a> (<a class="el" href="struct_port_info.html">PortInfo</a> *const src, <a class="el" href="struct_port_info.html">PortInfo</a> *const dst, FIFO *const fifo)</td></tr>
<tr class="separator:a1d5c71b5cd6fc9671ed82d9c1d04965c inherit pro_methods_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a901eb0fdb6cffd56019c9ab9f2b25f92 inherit pro_methods_class_allocate"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a901eb0fdb6cffd56019c9ab9f2b25f92"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>allocate</b> (<a class="el" href="struct_port_info.html">PortInfo</a> &amp;a, <a class="el" href="struct_port_info.html">PortInfo</a> &amp;b, void *data)</td></tr>
<tr class="separator:a901eb0fdb6cffd56019c9ab9f2b25f92 inherit pro_methods_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cf36bb704e43f5736a0e736d9e1a81b inherit pro_methods_class_allocate"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a4cf36bb704e43f5736a0e736d9e1a81b">setReady</a> ()</td></tr>
<tr class="separator:a4cf36bb704e43f5736a0e736d9e1a81b inherit pro_methods_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_allocate"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_allocate')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_allocate.html">Allocate</a></td></tr>
<tr class="memitem:a93e612d7ea7eb686fc88b5dee7a1407b inherit pro_attribs_class_allocate"><td class="memItemLeft" align="right" valign="top">kernelkeeper &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a93e612d7ea7eb686fc88b5dee7a1407b">source_kernels</a></td></tr>
<tr class="separator:a93e612d7ea7eb686fc88b5dee7a1407b inherit pro_attribs_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91e8c7d69ab7b309ea45439aea54fb4f inherit pro_attribs_class_allocate"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91e8c7d69ab7b309ea45439aea54fb4f"></a>
kernelkeeper &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>all_kernels</b></td></tr>
<tr class="separator:a91e8c7d69ab7b309ea45439aea54fb4f inherit pro_attribs_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a037410210c0d10578f87de1ec68f47ba inherit pro_attribs_class_allocate"><td class="memItemLeft" align="right" valign="top">std::set&lt; FIFO * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a037410210c0d10578f87de1ec68f47ba">allocated_fifo</a></td></tr>
<tr class="separator:a037410210c0d10578f87de1ec68f47ba inherit pro_attribs_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d10076b88ab1297c89b8a05e117b510 inherit pro_attribs_class_allocate"><td class="memItemLeft" align="right" valign="top">volatile bool &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_allocate.html#a4d10076b88ab1297c89b8a05e117b510">exit_alloc</a></td></tr>
<tr class="separator:a4d10076b88ab1297c89b8a05e117b510 inherit pro_attribs_class_allocate"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5dcbbfb5f2d7b04138c5f74e6c561ffa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">stdalloc::stdalloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_map.html">Map</a> &amp;&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">volatile bool &amp;&#160;</td>
          <td class="paramname"><em>exit_alloc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stdalloc - default constructor, calls base allocate constructor of Allcoate which sets the map object. After setting this object loose in a thread, the notReady() function must be called so that the queue sees fully allocated buffers as opposed ot null objects. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">map</td><td>- <a class="el" href="class_map.html">Map</a>&amp;, map with full application </td></tr>
    <tr><td class="paramname">exit_alloc</td><td>- bool whose value is set by the map object owning this one. Controls when the loop within the run thread is exited.</td></tr>
  </table>
  </dd>
</dl>
<p>stdalloc.cpp - simple allocation, just initializes the FIFO with a fixed size buffer (512 items) with an alignment of 16-bytes. This can easily be changed by changing the constants below.</p>
<dl class="section author"><dt>Author</dt><dd>: Jonathan Beard </dd></dl>
<dl class="section version"><dt>Version</dt><dd>: Sat Sep 20 19:56:49 2014</dd></dl>
<p>Copyright 2014 Jonathan Beard</p>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>

</div>
</div>
<a class="anchor" id="a46d60193ee113f34caf4ddf4385c9f0d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">stdalloc::~stdalloc </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>destructor, doesn't really do much at he moment. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a60438b15948ce354b52b03ba6d975de0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void stdalloc::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>run - call within a thread, internally we could have a loop before exiting but this version simply allocates and exits. </p>
<p>assume everyone needs a heap for the moment to get working</p>
<p>check and see if a has a defined allocation</p>
<p>check for pre-existing alloc size for test purposes</p>
<p>size</p>
<p>align </p>

<p>Implements <a class="el" href="class_allocate.html#a44f9b51c382fec159233609e21b9d272">Allocate</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="stdalloc_8hpp_source.html">stdalloc.hpp</a></li>
<li>stdalloc.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
